NYC Public Restrooms

Type of Restroom Location

restroom_location_bar = restroom_cleaned |> 
  group_by(location_type) |> 
  count(location_type) |> 
  mutate(loation_type = fct_reorder(location_type, n)) |> 
  plot_ly (x = ~location_type, y = ~n, color = ~location_type,
           type = "bar",text = ~n, textposition = "outside") |> 
  layout(
    xaxis = list(title = "Location Type"),   
    yaxis = list(title = "Number of Restrooms") 
  )

 restroom_location_bar

The majority of collected restrooms are located in Park and Library, and only a few restrooms are located in Privately Owned Public Space, Public Plaze, and Transit. This might provide guidance for the future establishment of public restrooms: public plaza have siginificant foot traffic, yet public restrooms are so scarce.

Whether or not the Restroom is Only Operational on a Seasonal Schedule

restroom_open_bar = restroom_cleaned |> 
  filter(!is.na(open))|>
  group_by(open) |> 
  count(open, name = "n") |> 
  ungroup()|>
  mutate(open = fct_reorder(open, n)) |> 
  plot_ly (x = ~open, y = ~n, color = ~open,
           type = "bar", text = ~n, textposition = "outside",
           texttemplate = "%{text}") |> 
  layout(
    xaxis = list(title = "Open Type"),   
    yaxis = list(title = "Number of Restrooms") 
  )

 restroom_open_bar

From the collected data, New York City provides public restroom facilities as follows, 864 open Year Round, 123 open Seasonal, and 12 open Future. Most public restrooms are open year-round, which is good news!

The Level of ADA Accessibility where the Restroom is Located

restroom_accessibility_bar = restroom_cleaned |> 
  filter(!is.na(accessibility))|>
  group_by(accessibility) |> 
  count(accessibility, name = "n") |> 
  ungroup()|>
  mutate(accessibility = fct_reorder(accessibility, n)) |> 
  plot_ly (x = ~accessibility, y = ~n, color = ~accessibility,
           type = "bar",text = ~n, textposition = "outside") |> 
  layout(
    xaxis = list(title = "Accessibility Type"),   
    yaxis = list(title = "Number of Restrooms") 
  )

 restroom_accessibility_bar

Although the number of Fully Accessible is the highest, there are still quite a few that are Not Accessible. We still need to work on improving the implementation of public restrooms to provide services for everyone.

The Number and Gender Designation of the Stalls

restroom_type_bar = restroom_cleaned |> 
  filter(!is.na(restroom_type))|>
  group_by(restroom_type) |> 
  count(restroom_type, name = "n") |> 
  ungroup()|>
  mutate(restroom_type = fct_reorder(restroom_type, n)) |> 
  plot_ly (x = ~restroom_type, y = ~n, color = ~restroom_type,
           type = "bar", text = ~n, textposition = "outside") |> 
  layout(
    xaxis = list(title = "Restroom Type"),   
    yaxis = list(title = "Number of Restrooms")
  )

 restroom_type_bar

Multi-Stall W/M Restrooms are the most commonly built, while Multi-Stall All Gender Restrooms are the least, with only 4. We need to provide more Multi-Stall All Gender Restrooms so they can serve all groups and more people at same time.

NYC Subway

Vending machine status

subway_vending_pie = subway_cleaned |> 
  group_by(vending) |> 
  count(vending, name = "n") |> 
  mutate(vending = fct_reorder(vending, n)) |> 
  plot_ly (labels = ~vending, values = ~n, type = "pie",
           textinfo = "label+percent", 
           marker = list(colors = viridis::viridis(2)) )|> 
  layout(title = "Subway Vending"
     )

 subway_vending_pie

The pie chart tells that mostly subway stations have vending machines now.

Entrance Type of Subway Station

subway_entrance_bar = subway_cleaned |> 
  group_by(entrance_type) |> 
  count(entrance_type, name = "n") |> 
  mutate(entrance_type = fct_reorder(entrance_type, n)) |> 
  plot_ly (x = ~entrance_type, y = ~n, color = ~entrance_type, colors = "viridis", text = ~n, textposition = "outside", type = "bar") |> 
  layout(
    xaxis = list(title = "Subway Entrance Type"),   
    yaxis = list(title = "Number of Subway Stations") 
  )

 subway_entrance_bar

Majority of subway stations’ entrance type is Stair. The least common subway station entrance is Walkway and Ramp.